﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="apple-itunes-app" content="app-id=591578609">
<meta name="viewport" content="width=device-width"/>
<meta name="description" content="筑学堂网校" />
<meta name="keywords" content="筑学堂网校、建筑、考试"/>

<link rel="stylesheet" type="text/css" href="../../style/share/style.css">
<link rel="stylesheet" type="text/css" href="../../style/share/kczx.css">
<link rel="stylesheet" type="text/css" href="../../style/share/home_style.css">
<link rel="stylesheet" type="text/css" href="../../style/user.css">
	
<!--[if IE 7]>
<link rel="stylesheet" href="/css/font-awesome/css/font-awesome-ie7.min.css">
<![endif]-->

<script type="text/javascript" src="../js/home.js"></script>

<script type="text/javascript">

	//取消
	function cancelAdd(){
		   $.ajax({ url: "../query_group_topic/${group_id}/1/null", 
		       success: function(result){
	           $("#mainPageDiv").html(result);
	        }
	       });
	}
	
	//保存添加
	function addGroup(){
		   var group_name =$("#group_name").val();
		   var group_txt = $("#group_txt").val();
		   var location_nm =$("#location_nm").val();
		   var group_notice = $("#group_notice").val();
		   var class_tp = $("#class_tp").val();
		  
 		   var url = "/sumer/group/group_add";
		   
		   $.ajax({ url:url , 
   		    type:"post",
   		    data:{
   		    	group_name:group_name,
   		    	group_txt:group_txt,
   		    	location_nm:location_nm,
   		    	group_notice:group_notice,
   		    	class_tp:class_tp
   		    },
		       success: function(result){
	           if('success'==result){
	        	   $.ajax({ url: "init", 
	    		       success: function(result){
	    	           $("#mainPageDiv").html(result);
	    	        }
	    	       });
	           }
	        }
		   });
   }

</script>
<title>筑学堂家园个人空间</title>
<style type="text/css">
a {
	color:#222;
}
a:hover {
	color:#888;
}
li {
	list-style-type:none;
	border:none;
}
</style>
</head>
<body style="align:center; padding:0;margin:0;clear:both; background-color:FFF;">
  <div class="home_group">
			<div class="home_groupnotice" style="min-height:60px;">
				<div class="home_grnottit" style="margin-top:20px;margin-bottom:30px;"> 创建群组</div>
				<div class="home_groupnot" style="padding-top:20px;padding-left:10px;"> 
				<span style="font-weight:bold">群组名称：</span>
				<input style="width:500px;height:26px;margin:0;padding:0;" type="text" id="group_name"/>
				<br/>
				<br/>
				<span style="font-weight:bold">群组类型：
				</span>
					<select id="class_tp">
					  <c:forEach items="${typeList}" var="li">
					  	<option value ="${li.cd}">${li.nm}</option>
					  </c:forEach>
					</select>
				<br/>
				<br/>
				<span style="font-weight:bold;vertical-align:top;">群组简介：</span>
				<textarea style="width:500px;height:150px;" id="group_txt">  </textarea>
				<br/>
				<br/>
				<span style="font-weight:bold">群组位置：</span>
				<input style="width:500px;height:26px;margin:0;padding:0;" type="text" id="location_nm"/>
				<br/>
				<br/>
				<span style="font-weight:bold;vertical-align:top;">群组公告：</span>
				<textarea style="width:500px;height:150px;" id="group_notice">  </textarea>
				</div>
				<div class="blogadd_title01" style="width:98%;margin-top:40px;">
			<a href="#" onclick="addGroup()">
			  <div class="blogadd_textadd" style="position:relative;float:left;left:35%;background-color:#209E85;"> 创建群组 </div>
			</a>
			
			 <div style="position:relative;float:left;left:35%;margin-left:10px;">
			    <a href="#" onclick="cancelAdd()"> 取消</a>
			 </div>
		</div>
				
			</div>
		</div>
</body>
</html>